/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function submitPlanPush(planId){
            var pushPlanForm = document.forms["pushPlan"+planId];
            var patientSelect = pushPlanForm.elements["patientSelect"];
            var patientId = patientSelect.options[patientSelect.selectedIndex].value;
            var doctorId = pushPlanForm.elements["doctorId"].value;
            
            $.ajax({
                url: "Plans?action=push&planId="+planId+"&patientId="+patientId+"&doctorId="+doctorId,
                dataType: "text",
                success: function(eventsObject) {
                    window.top.location.href = "plans.jsp";
                },
                error: function(data,data2,data3) {
                    alert("Failed: "+data+" \n\n"+data2+"\n\n"+data3);
                }
            });
        }
